<?php
/**
 * Sablony table class
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

/**
 * Mista Table class
 *
 * @subpackage Components
 */
class TableSablony extends JTable
{
    /**
     * Primary Key
     *
     * @var int
     */
    var $id = null;

    //typ varchar
    var $nazev = null;


    /**
     * Constructor
     *
     * @param object Database connector object
     */
    function TableSablony(& $db) {
        parent::__construct('#__sablony', 'id', $db);
    }

    //validace
    function check() {
        $chyba = '';
        $jeToOk_bool = false;
        if ($this->nazev) {
            $jeToOk_bool = true;
        } else {
            $chyba = 'Musíte zadat název šablony!';
        }

        if (!empty($chyba)) {
            $this->setError(JText::_($chyba));
        }
        return $jeToOk_bool;
    }

}

